#include <iostream>
#include <vector>
#include <queue>
using namespace std;

bool v[202];

int findCircleNum(vector<vector<int>>& isConnected) {
    int n = isConnected.size();
    int ans = 0;
    for (int i = 0; i < n; i++) {
        if (!v[i]) {
            queue<int> Q;
            Q.push(i);
            while(!Q.empty()){
                int j = Q.front();
                Q.pop();
                for(int k=0;k<n;k++){
                    if(!v[k] && isConnected[j][k] == 1){
                        v[k] = 1;
                        Q.push(k);
                    }
                }
            }
            ans++;
        }
    }
    return ans;
}


int main() {
    return 0;
}